MOO_COW
|
Curate
|
|
|
Reged: 02/05/04
|
Posts: 571
|
Loc: ^ in a field with a hat (more specifically, Sheffield, England :P)
|
|
|
I need to make a door (load door) that does not have a lock lvl, but you HAVE to have the key to open it, otherwise there's no means of entry. Is it a script i need? If so any useful scripts posted here would be greatly appreciated . Thanks.
MooCow
-------------------- Still round the corner there may wait
A new road or a secret gate;
And though I oft have passed them by,
A day will come at last when I
Shall take the hidden paths that run
West of the Moon, East of the Sun.
Post Extras:
|
|
|
First make a key, lets say it has Id of "Moo_key_01"
Begin PB_Locked_door
short done
if ( OnActivate == 1 ) if ( Player->GetItemCount "Moo_key_01" < 1 ) Messagebox "The door is locked and you need the key" "OK" Playsound3d "lockeddoor" elseif (player->GetItemCount "Moo_key_01" > 0 ) if ( done == 0 ) Messagebox "Moo Key used to open door" Activate Set Done to 1 elseif ( done == 1 ) Activate endif endif endif
end
Post Extras:
|
|
|
Would that work on treasure chests as well?
~PS
Post Extras:
|
Zentetsuken
|
Acolyte
|
|
|
Reged: 09/09/03
|
Posts: 152
|
Loc: Europ, Poland
|
|
|
And will it check for the key everytime the player's will try to open the door?
-------------------- "Many fall, but one remains"- Azura, The Princess of Dusk and Dawn
~~~ Czeladnik Brotherhood of the Secret Flame ~~~~~~~~
Post Extras:
|
Zentetsuken
|
Acolyte
|
|
|
Reged: 09/09/03
|
Posts: 152
|
Loc: Europ, Poland
|
|
|
Oh and the script dosen't work. It gives my an erroe first about the audio command and later about the MessegeBox, and it can't be compiled.
-------------------- "Many fall, but one remains"- Azura, The Princess of Dusk and Dawn
~~~ Czeladnik Brotherhood of the Secret Flame ~~~~~~~~
Post Extras:
|
|
|
I cant see why that isnt compiling....I must use this script or a variation thereof almost every day
It will, as it is written, check for the key every every time (and will work on all objects that need keys, or indeed all objects that need an object to activate them). If the player has a key, then the first time it will give a messagebox about 'Key used to open door' but not on subsequent visits.
Hmm, all I can think of is the playsound
It must be
Playsound3d "lockeddoor"
Note the double 'd' in the middle there, its two words, locked and door, bumped together
To change it so that it will only check the first time is just a matter of slight re-organisatio.
Post Extras:
|
slategrey
|
Curate
|
|
|
Reged: 06/25/02
|
Posts: 494
|
Loc: Finland
|
|
|
Heres a REALLY simple script that does exactly what you want Moo Cow.
begin Bovine_Door_Opener
if ( OnActivate == 1 )
if ( player->getitemcount, "Bovine_Opener" > 0 )
Activate
else
MessageBox "The Door appears magically sealed" "Ok"
endif
endif
End Bovine_Door_opener
Pretty much along the same lines as petrograds but a few less if endif statements. If you want sounds, just add em above the messagebox and above the activate statement.
-------------------- ---------------------------------------------
Founder and "Soul" member of the "I love Kai Globes" Fan Club
Kai Globes v2.8, Apprentice Scrolls and Mystic Quills v1.4 . Don't leave Home without them.
Multi Manniquins V1.2; The Manniquin that changes to suit your needs.
Edited by slategrey (08/21/04 04:44 PM)
Post Extras:
|
MOO_COW
|
Curate
|
|
|
Reged: 02/05/04
|
Posts: 571
|
Loc: ^ in a field with a hat (more specifically, Sheffield, England :P)
|
|
|
ok, thanks for the replies guys, this is a big help. I'll try both out anyway, so no worries about that. Thanks again
-------------------- Still round the corner there may wait
A new road or a secret gate;
And though I oft have passed them by,
A day will come at last when I
Shall take the hidden paths that run
West of the Moon, East of the Sun.
Post Extras:
|
Zentetsuken
|
Acolyte
|
|
|
Reged: 09/09/03
|
Posts: 152
|
Loc: Europ, Poland
|
|
|
Yes the secound script works perfectly. And another question: When i delate the "OK" in this script will it be shown like the one on Cavern of Incarnate doors? (message at the bottom of the screen without button)
-------------------- "Many fall, but one remains"- Azura, The Princess of Dusk and Dawn
~~~ Czeladnik Brotherhood of the Secret Flame ~~~~~~~~
Post Extras:
|
JubJub
|
Adept
|
|
|
Reged: 08/18/04
|
Posts: 378
|
Loc: Wawa, Ontario, Canada
|
|
|
Maybe look for the script that controls the priest guys liquor cabinet from Bloodmoon's Fort Frostmoth?
-------------------- There's more than one way to skin a cat, but who are these people going around, skinning cats??
Clickey for pickey
\\\\|////
( o Y O ) I start fires!!
T
-______-
Founder of Swords for Nords!
I never apologize! I'm sorry, that's just the way I am!
Post Extras:
|
slategrey
|
Curate
|
|
|
Reged: 06/25/02
|
Posts: 494
|
Loc: Finland
|
|
|
Yep zentetsuken just delete the ok. The message will then appear and disappear as normal.
-------------------- ---------------------------------------------
Founder and "Soul" member of the "I love Kai Globes" Fan Club
Kai Globes v2.8, Apprentice Scrolls and Mystic Quills v1.4 . Don't leave Home without them.
Multi Manniquins V1.2; The Manniquin that changes to suit your needs.
Post Extras:
|